<!--
 * @Author: your name
 * @Date: 2019-10-31 09:04:33
 * @LastEditTime: 2019-10-31 09:23:26
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /docker/dapps/app/view/store/quick.ejs
 -->
 <%- include('header'); %>
 <!-- Sidenav -->
 <%- include('sidebar'); %>
 <!-- Main content -->

 <!-- Content Wrapper. Contains page content -->
 <div class="content-wrapper">
   
   <section class="content-header">
     <!-- <div class="container-fluid">
       <div class="row mb-2">
         <div class="col-sm-6">
           <h1>ddd</h1>
         </div>
       </div>
     </div> -->
   </section>
   <div class="wrap">
     <div id="qb-bg" style="display: none;"></div>
     <form action="http://www.baidu.com/baidu" target="_blank">
         <input name=tn type=hidden value=baidu>
         <div class="search">
             <div class="qbsbox-container" data-btn="text" data-logo="top" style="width: 692px;" data-engine="baidu">
                 <div class="qbsbox-logo"></div>
                 <div class="qbsbox-main">
                     <div class="qbsbox-input-wrap"><input type="text" name=word class="qbsbox-input" data-log="search.13" id="irid_1"
                                                           placeholder="请输入要搜索的内容">
                     </div>
                     <input  class="qbsbox-search-btn" type="submit" value="百度一下" >
                 </div>
             </div>
         </div>
     </form>
     <div class="sites-drag" draggable="false"></div>
   </div>
   <!-- Main content -->

   <% if (app_list.length == 0) {%>
     <!-- <h5 class="mb-2">没有数据，<a href="/html/v1/store/list">浏览应用商店</a></h5> -->
   <% } else { %>
     <div class="card-body pad table-responsive" style="padding:0rem">
       <table class="table text-center">
         <% for (let i = 0; i < app_list.length; i++) {
           let oneLevel = app_list[i];
         %>
           <tr>
               <% for (let j = 0; j < oneLevel.length; j++) {
                 let one = oneLevel[j];
               %>
                 <td style="border-top: 0px;" width="12.5%" >
                   <% if (one.appid != '') {%>
                     <a href="<%= one.open_url %>" target="_blank">
                         <button type="button" class="btn btn-block btn-outline-secondary" style="border-color:#f4f6f9"><%= one.app_name %></button>
                     </a>
                   <% } %>
                 </td>
               <% } %>
           </tr>
         <% } %>
       </table>
     </div>
   <% } %>

   <section class="content">
     <div class="container-fluid">

       <div class="col-md-9" style="max-width: 100%;">
         <div class="card">
           <div class="card-header p-2">
             <ul class="nav nav-pills">
              <% var flag1 = 1; for (var m in web_sites) {
                var one = web_sites[m];
              %>
                <li class="nav-item">
                  <a href="#<%= one.name %>" data-toggle="tab"
                  <% if (flag1 == 1) { %> class="nav-link active" <% } else { %> class="nav-link" <% } %>
                  ><%= one.type %>
                  </a>
                </li>
               <% flag1++; } %>
             </ul>
           </div><!-- /.card-header -->
           <div class="card-body">
              <div class="tab-content">
              <% var flag2 = 1; for (var n in web_sites) {
                var web_type1 = web_sites[n];
                var web_type2 = web_type1.children;
              %>

                <div id="<%= web_type1.name %>" <% if (flag2 == 1) { %> class="active tab-pane" <% } else { %> class="tab-pane" <% } %>>
                  <%
                    for (var o in web_type2) {
                      var web_type2_one = web_type2[o];
                      var web_type2_list = web_type2_one.list;
                  %>
                  <h5 class="card-title"><%= web_type2_one.type %></h5>
                  <div class="card-body pad table-responsive">
                    <table class="table text-center">
                      <%
                        for (var p = 0; p < web_type2_list.length; p++ ) {
                          var chunkList = web_type2_list[p];
                      %>
                      <tr>
                        <%
                          for (var q = 0; q < chunkList.length; q++ ) {
                            var web_site_info = chunkList[q];
                        %>
                        <td style="border-top: 0px;" width="12.5%" >
                          <% if (web_site_info.url != '') { %>
                            <a href="<%= web_site_info.url %>" target="_blank"><button type="button" class="btn btn-block btn-default"><%= web_site_info.name %></button></a>
                          <% } %>
                        </td>
                        <% } %>
                      </tr>
                      <% } %>
                    </table>
                  </div>
                  <% } %>

                </div>

               <% flag2++; } %>

             </div>
             <!-- /.tab-content -->
           </div><!-- /.card-body -->
         </div>
         <!-- /.nav-tabs-custom -->
       </div>

     </div>

   </section>
   <!-- /.content -->
 </div>
 <!-- /.content-wrapper -->

 <script>

 </script>
<%- include('bottom'); %>